//
//  MenuZhuanTiMainTableViewCell.m
//  Products_B
//
//  Created by lanou on 16/6/4.
//  Copyright © 2016年 朋学友. All rights reserved.
//

#import "MenuZhuanTiMainTableViewCell.h"

@implementation MenuZhuanTiMainTableViewCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.picImageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, kWidth, kWidth * 418 / 1242)];
        self.titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(20, kWidth * 418 / 1242 , kWidth - 40, 30)];
        self.titleLabel.font = [UIFont systemFontOfSize:14];
        self.titleLabel.textAlignment = NSTextAlignmentCenter;
        
        self.contentLabel = [[UILabel alloc]initWithFrame:CGRectMake(20, kWidth * 418 / 1242 + 40, kWidth - 40, 50)];
        self.contentLabel.textAlignment = NSTextAlignmentCenter;
        self.contentLabel.numberOfLines = 0;
        self.contentLabel.font = [UIFont systemFontOfSize:13];
        self.contentLabel.textColor = [UIColor grayColor];
        self.contentLabel.textAlignment = NSTextAlignmentCenter;
        [self.contentView addSubview:_picImageView];
        [self.contentView addSubview:_titleLabel];
        [self.contentView addSubview:_contentLabel];
        
    }
    return self;
}
- (void)setModel:(MenuZhuanTiMainModel *)model{
    _model = model;
    [self.picImageView sd_setImageWithURL:[NSURL URLWithString:model.image] placeholderImage:nil
                                completed:nil];
    self.titleLabel.text = model.title;
    self.contentLabel.text = model.descriptiont;
    
  
}
@end
